package com.project.controller.goodsOrderInfoController;

import com.github.pagehelper.PageInfo;
import com.project.bean.GoodsOrderBean;
import com.project.bean.GoodsOrderInfoBean;
import com.project.service.goodsOrderInfoService.IGoodsOrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

@RestController
@RequestMapping("/goodsOrderInfo")
public class GoodsOrderInfoController {
    @Autowired
    private IGoodsOrderInfoService service;

    @RequestMapping("/findByItem")
    public PageInfo<GoodsOrderInfoBean> findByItem(int pageNO, String state, LocalDate startDate, LocalDate endDate, int userId){
        return service.findByItem(pageNO, state, startDate, endDate,userId);
    }
    @RequestMapping("/findById")
    public GoodsOrderBean findById(int orderId){
        return service.findById(orderId);
    }
}
